package com.xcf.cloud.codesvc.dao;

import com.xcf.cloud.codesvc.entity.AuthCode;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

@Repository
public interface AuthCodeRepository extends JpaRepository<AuthCode, Integer> {

    AuthCode findTopByEmailOrderByIdDesc(String email);

    AuthCode findTopByEmailAndCodeOrderByIdDesc(String email, String code);
}
